package com.han.adapter.object_adapter;

/**
 * @ClassName SDAdapterTF
 * @Description 适配器类
 * @Author duoduo Han
 * @Date 2024/6/6 15:35
 */
public class SDAdapterTF implements SDCard {
    //声明适配者类
    private TFCard tfCard;

    public SDAdapterTF(TFCard tfCard) {
        this.tfCard = tfCard;
    }

    @Override
    public String readSD() {
        System.out.println("Adapter Read TF Card");
        return this.tfCard.readTF();
    }

    @Override
    public void writeSD(String msg) {
        System.out.println("Adapter Write TF Card");
        this.tfCard.writeTF(msg);
    }
}
